import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '构件名称',
    align: 'left',
    dataIndex: 'name'
   },
   {
    title: '构件编号',
    align: 'center',
    dataIndex: 'code'
   },
   {
    title: '项目id',
    align: 'center',
    dataIndex: 'projectId_dictText'
   },
   {
    title: '是否显示',
    align: 'center',
    dataIndex: 'isVisible_dictText'
   },
   {
    title: '所属模块',
    align: 'center',
    dataIndex: 'moduleType_dictText'
  },
  //  {
  //   title: '是否有子节点',
  //   align: 'center',
  //   dataIndex: 'hasChild'
  //  },
   {
    title: 'ud4构件id',
    align: 'center',
    dataIndex: 'ue4Id'
   },
   {
    title: '测站id',
    align: 'center',
    dataIndex: 'stationId'
   },
   {
    title: '备注',
    align: 'center',
    dataIndex: 'note'
   },
   {
    title: 'ue4视角属性yaw',
    align: 'center',
    dataIndex: 'ue4Yaw'
   },
   {
    title: 'ue4视角属性locaction',
    align: 'center',
    dataIndex: 'ue4Location'
   },
   {
    title: 'ue4视角属性pitch',
    align: 'center',
    dataIndex: 'ue4Pitch'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '构件名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '构件编号',
    field: 'code',
    component: 'Input',
  },
  {
    label: '项目id',
    field: 'projectId',
    component: 'JSearchSelect',
    componentProps:{
       dict:"project_info,name,id"
    },
  },
  {
    label: '是否显示',
    field: 'isVisible',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"yn"
     },
  },
  {
    label: '所属模块',
    field: 'moduleType',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"is_module"
     },
  },
  {
    label: '父级id',
    field: 'pid',
    component: 'JTreeSelect',
    componentProps: {
      dict: "bim_structure_info,name,id",
      pidField: "pid",
      pidValue: "0",
      hasChildField: "has_child",
    },
  },
  // {
  //   label: '是否有子节点',
  //   field: 'hasChild',
  //   component: 'Input',
  // },
  {
    label: 'ud4构件id',
    field: 'ue4Id',
    component: 'Input',
  },
  {
    label: '测站id',
    field: 'stationId',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'note',
    component: 'InputTextArea',
  },
  {
    label: 'ue4视角属性yaw',
    field: 'ue4Yaw',
    component: 'InputNumber',
  },
  {
    label: 'ue4视角属性locaction',
    field: 'ue4Location',
    component: 'InputTextArea',
  },
  {
    label: 'ue4视角属性pitch',
    field: 'ue4Pitch',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
  {
    label: '',
    field: 'sub',
    component: 'Input',
    show: false
  },
];
